package com.khong.sale.ui;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;

import com.khong.sale.R;
import com.khong.sale.ui.ContactsListItems.Holder;

public class ContactsLabelItem implements ContactsListItems {

	private int type;
	private String label;

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public ContactsLabelItem(String label, int type) {
		this.type = type;
		this.label = label;
	}

	@Override
	public int getLayout() {
		return R.layout.contacts_list_item_label;
	}

	@Override
	public boolean isClickable() {
		return false;
	}

	@Override
	public View getView(Context context, View view, LayoutInflater inflater) {
		Holder hoder;
		if (view == null) {
			hoder = new Holder();
			view = inflater.inflate(getLayout(), null);
			hoder.txt1 = (TextView) view.findViewById(R.id.contacts_label);
			view.setTag(hoder);
		} else {
			hoder = (Holder) view.getTag();
		}
		hoder.txt1.setText(label);
		return view;
	}

}
